import {createRouter, createWebHistory, RouteRecordRaw} from 'vue-router'
import Home from '../views/Home.vue'

const routes: Array<RouteRecordRaw> = [
    {
        path: '/',
        name: 'Home',
        component: Home
    },
    {
        path: '/about',
        name: 'About',
        component: () => import('../components/About.vue')
    },
    {
        path: '/refs',
        name: 'Refs',
        component: () => import('../components/ToRefs.vue')
    },
    {
        path: '/reactive',
        name: 'Reactive',
        component: () => import( '../components/Reactive.vue')
    },
    {
        path: '/shallow',
        name: 'Shallow',
        component: () => import('../components/Shallow.vue')
    },
    // {
    //     path: '/baidumap',
    //     name: 'BaiDuMap',
    //     component: () => import('../components/BaiDuMap.vue')
    // },
]

const router = createRouter({
    history: createWebHistory(process.env.BASE_URL),
    routes
})

export default router
